package org.blogwu.learn.designpattern.chapter12.v3;

/**
 * 适配器具体实现
 *
 * @author hyf
 * @date 2018-10-28
 **/
public class PowerAdapter implements DC5V {

    private AC220V ac220V = new AC220V();

    @Override
    public int outPutDC5V() {
        int adaptetInput = ac220V.outPutAC220V();

        //变压器，吧220变成5v
        int adapterOutPut = adaptetInput / 44;
        System.out.println("使用PowerAdapter输入AC：" + adaptetInput + "V  输出：" + adapterOutPut);
        return adapterOutPut;
    }
}
